public class ArrayUtil {
    public static double average(double[] arr){
        double sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum+=arr[i];
        }
        return sum/arr.length;
    }
    public static String arrprint(int[] arr){
        StringBuilder sb = new StringBuilder();
        sb.append("[");
        for (int i = 0; i < arr.length; i++) {
            if (i == arr.length-1)
                sb.append(arr[i]).append("]");
            else sb.append(arr[i]).append(", ");
        }
        return sb.toString();
    }
}
